import { path } from "../../config/path";
import request from './request';

/** 科室列表 GET /manage/get_department_list */
export async function department_list(body?: any, options?: any) {
  return request(path + '/manage/get_department_list', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}

/** 科室列表(下拉框) GET /manage/get_department_select */
export async function department_select(body?: any, options?: any) {
  return request(path + '/manage/get_department_select', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 新增/编辑科室 POST /manage/add_edit_department */
export async function add_edit_department(body?: any, options?: any) {
  return request(path + '/manage/add_edit_department', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 科室详情 GET /manage/get_department_info */
export async function department_info(body?: any, options?: any) {
  return request(path + '/manage/get_department_info', {
    method: 'GET',
    headers: {
      Authorization: localStorage.loginToken,
    },
    params: body,
    ...(options || {}),
  });
}
/** 修改科室状态 POST /manage/edit_depart_status */
export async function edit_depart_status(body?: any, options?: any) {
  return request(path + '/manage/edit_depart_status', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
/** 删除科室 POST /manage/delete_department */
export async function delete_department(body?: any, options?: any) {
  return request(path + '/manage/delete_department', {
    method: 'POST',
    headers: {
      Authorization: localStorage.loginToken,
    },
    data: body,
    ...(options || {}),
  });
}
